﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enter.BizLogic;
using System.Data;
using Enter.Config;
using Enter.Entity;

namespace Enter.Services.Mail
{
    public partial class Mail : IMail
    {
         /// <summary>
        /// 修改商品标题
        /// </summary>
        /// <param name="id"></param>
        /// <param name="shopNO"></param>
        /// <param name="title"></param>
        /// <returns></returns>
        public bool UpdateTitle(int id, string shopNO, string title)
        {

            T101_GoodsBLLSub bll = new T101_GoodsBLLSub();
            return bll.UpdateTitle(id, shopNO, title);
        }
        /// <summary>
        /// 获取店铺等待上架的商品
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="shopNO">店铺</param>
        /// <param name="status">状态</param>
        /// <param name="classNo">类目</param>
        /// <param name="title">商品名称</param>
        /// <param name="outerId">商户编号</param>
        /// <param name="sprice">价格</param>
        /// <param name="eprice"></param>
        /// <param name="startnum">销售数量</param>
        /// <param name="endnum"></param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        public DataTable GetWaitGoodsByShop(string shopNO, EnumGoodStatus status, string classNo, string title, string outerId, decimal sprice, decimal eprice, int startnum, int endnum, EnumGoodOrder orderCol, EnumOrderType orderType, int pageSize, int currentPageIndex, out int totalPages, out int totalCount)
        {
            T101_GoodsBLLSub bll = new T101_GoodsBLLSub();
            return bll.GetWaitGoodsByShop(shopNO, status, classNo, title, outerId, sprice, eprice, startnum, endnum, orderCol, orderType, pageSize, currentPageIndex, out  totalPages, out  totalCount);

        }
        /// <summary>
        /// 商品库存
        /// </summary>
        /// <param name="gNo"></param>
        /// <returns></returns>
        public List<T103_Goods_ItemEntity> getGoodItem(string gNo)
        { 
            T103_Goods_ItemBLLSub bll=new T103_Goods_ItemBLLSub();

            return bll.getGoodItem(gNo);
        }
    }
}
